from django.conf.urls import patterns, url
from bets import views
from django.contrib.auth.decorators import login_required

urlpatterns = patterns('',
    url(r'^user/games/$', login_required(views.game_view), name = 'game_view'),
    url(r'^user/games/(?P<game_name>\w+)/(?P<tour_id>\d+)/bets/$', login_required(views.bet_view), name = 'bet_view'),
    url(r'^user/games/(?P<game_name>\w+)/tour/$', login_required(views.tournament_view), name = 'tournament_view'),
    url(r'^user/games/(?P<game_name>\w+)/(?P<bet>\w+)/(?P<tour>\w+)/teams/$', login_required(views.team_view), name = 'team_view'),
    url(r'^user/games/(?P<game_name>\w+)/players/(?P<player_id>\d+)/$', login_required(views.player_profile_view), name = 'player_profile_view'),
    url(r'^user/games/(?P<game_name>\w+)/teams/(?P<team_id>\d+)/$', login_required(views.team_profile_view), name = 'team_profile_view'),
    url(r'^user/success/(?P<game_name>\w+)/(?P<tour_id>\w+)$', views.bet_success_view, name = 'bet_success_view'),
    url(r'^user/balance/$', login_required(views.balance_view), name = 'balance_view'),
    url(r'^user/search/$', login_required(views.search_view), name = 'search_view'),
    
    url(r'^accounts/login/$', views.login_view, name = 'login_view'),
    url(r'^accounts/logout/$', login_required(views.logout_view), name = 'logout_view'),
    url(r'^accounts/register/$', views.register_view, name = 'register_view'),
)
